using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ATL_ActionMap : EntityTypeConfiguration<ATL_Action>
    {
        public ATL_ActionMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.SecCode)
                .HasMaxLength(50);

            this.Property(t => t.Workstation)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("ATL_Action");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.User).HasColumnName("User");
            this.Property(t => t.SecCode).HasColumnName("SecCode");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Result).HasColumnName("Result");
            this.Property(t => t.Workstation).HasColumnName("Workstation");
        }
    }
}
